import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/employee/attendance/list',
    method: 'get',
    params: query
  })
}

export function uploadEmployee(params) {
  return request({
    url: '/employee/attendance/upload/excel',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    processData: false,
    data: params
  })
}

export function uploadImg(params) {
  return request({
    url: '/employee/attendance/upload/image',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    processData: false,
    data: params
  })
}

export function exportList() {
  return request({
    url: '/employee/attendance/export',
    responseType: 'blob',
    method: 'get'
  })
}
